/* 通用输入框组件样式 */
.common-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.common-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.common-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.common-input:focus {
  border-color: #4ecdc4;
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

/* 输入框变体样式 */
.common-input--default {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.common-input--filled {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.common-input--outlined {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.common-input--outlined:focus {
  border-color: #4ecdc4;
  background: rgba(255, 255, 255, 0.05);
}

/* 输入框大小样式 */
.common-input--small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 28px;
}

.common-input--medium {
  padding: 8px 16px;
  font-size: 14px;
  min-height: 36px;
}

.common-input--large {
  padding: 12px 20px;
  font-size: 16px;
  min-height: 44px;
}

/* 前缀和后缀样式 */
.common-input-prefix,
.common-input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}

.common-input-prefix {
  left: 12px;
}

.common-input-suffix {
  right: 12px;
}

.common-input--has-prefix {
  padding-left: 40px;
}

.common-input--has-suffix {
  padding-right: 40px;
}

.common-input--small.common-input--has-prefix {
  padding-left: 32px;
}

.common-input--small.common-input--has-suffix {
  padding-right: 32px;
}

.common-input--large.common-input--has-prefix {
  padding-left: 48px;
}

.common-input--large.common-input--has-suffix {
  padding-right: 48px;
}

/* 禁用状态 */
.common-input--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}

.common-input--disabled:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
}

/* 错误状态 */
.common-input--error {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.common-input--error:focus {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

/* 成功状态 */
.common-input--success {
  border-color: #2ed573;
  box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.2);
}

.common-input--success:focus {
  border-color: #2ed573;
  box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.2);
}

/* 搜索框特殊样式 */
.common-input[type="search"] {
  padding-left: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px;
}

.common-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.common-input[type="search"]::-webkit-search-cancel-button:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

/* 数字输入框特殊样式 */
.common-input[type="number"]::-webkit-inner-spin-button,
.common-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.common-input[type="number"] {
  -moz-appearance: textfield;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .common-input--medium {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
  }
  
  .common-input--large {
    padding: 10px 16px;
    font-size: 15px;
    min-height: 40px;
  }
  
  .common-input-prefix,
  .common-input-suffix {
    font-size: 13px;
  }
}
